package comp5511.project04;

public class Paper {
	
	private String pid;
	
	private String title;
	
	private String[] authors;
	
	private String[] keywords;
	
	private String path;
	
	public Paper(String pid, String title, String[] authors, String[] keywords, String path){
		this.pid = pid;
		this.title = title;
		this.authors = authors;
		this.keywords = keywords;
		this.path = path;
	}
	
	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String[] getAuthors() {
		return authors;
	}

	public void setAuthors(String[] authors) {
		this.authors = authors;
	}

	public String[] getKeywords() {
		return keywords;
	}

	public void setKeywords(String[] keywords) {
		this.keywords = keywords;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	
	public String toString(){
		StringBuffer sb = new StringBuffer();
		sb.append(this.pid);
		sb.append(" | ");
		sb.append(this.title);
		sb.append(" | ");
		for(int i=0; i<authors.length;i++){
			sb.append(authors[i]);
			if(i!=authors.length-1){
				sb.append(";");
			}
		}
		sb.append(" | ");
		for(int i=0; i<keywords.length;i++){
			sb.append(keywords[i]);
			if(i!=keywords.length-1){
				sb.append(",");
			}
		}
		sb.append(" | ");
		sb.append(this.path);
		return sb.toString();
		
	}
	
}
